#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>
typedef int heapdatatype;

typedef struct Heap {
	heapdatatype* a;
	int size;
	int capacity;
}Heap;

void HeapInit(Heap* php);
void HeapDestroy(Heap* php);
void HeapPush(Heap* php, heapdatatype x);
void HeapPop(Heap* php);
void AdjustDown(heapdatatype* a, int parent,int size);
void Adjustup(heapdatatype* a, int child);
void Swap(heapdatatype* p1, heapdatatype* p2);
heapdatatype HeapTop(Heap* php);
size_t Heapsize(Heap* php);
bool HeapEmpty(Heap* php);